package com.jmb.waimao.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jmb.waimao.entity.EmailAddress;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * Service interface for EmailAddress
 */
public interface EmailAddressService extends IService<EmailAddress> {
    
    /**
     * Import email addresses from CSV file
     * 
     * @param file CSV file containing email addresses
     * @param groupName Group name for the imported emails
     * @return Number of successfully imported email addresses
     */
    int importFromCsv(MultipartFile file, String groupName);
    
    /**
     * Get email addresses by group name
     * 
     * @param groupName Group name
     * @return List of email addresses
     */
    List<EmailAddress> getByGroup(String groupName);
}
